1. Field of the Invention
This invention relates to the field of image processing techniques. Specifically, this invention is a method, apparatus, system, and computer program product for implementing a tiled image processing architecture that uses deferred execution to implement a tiling pull model.
2. Background
Computer applications often use digitized video, computer generated, or scanned images. These applications are often directed towards document imaging, multimedia presentations and other similar needs.
For performance reasons, these applications are often programmed using minimal library support because of the overheads related to generalized image operations that affect performance of generalized image libraries. The images operated on by these application are often very largexe2x80x94typically from tens of megabytes to more than a gigabyte. Often the size of the image is larger than the memory available to store the image. To process such a large image, the image is generally xe2x80x9ctiledxe2x80x9d so that only a portion (a tile) of the image is in memory at a particular time. One high overhead operation of a traditional library results from sequentially applying a series of imaging operations to an image. In this situation, each tile of the source image is read into memory and operated on by the first imaging operation. Then, each tile of the image is again read into memory and operated on by the second imaging operation. Thus, each tile of the image is read into memory, modified, written back to filestorage for each deferred operation. This results in a large number of filestorage accesses each taking significant time when compared to the time required to operate on a single tile.
Compiler technology exists that optimizes sequences of computer operations when compiling a program. A general discussion of optimizing compilers and the related techniques used can be found in Compilers: Principles, Techniques and Tools by Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman, Addison-Wesley Publishing Co., 1988, ISBN 0-201-10088-6, in particular pages 546-567 and 598-602. It would be advantageous to apply these optimization techniques, with modifications, to determine which tiles of an image need to be processed, and then apply the imaging operations sequentially to each of those tiles in turn. This approach reduces the number of filesystem accesses required to realize the image.
The present invention improves the performance of a sequence of imaging operations on a tiled source image by sequentially applying the imaging operations to each relevant tile in the source image. One aspect of the invention is a computer controlled method for applying a plurality of sequential imaging operations to a tiled image. The method is performed by a computer that has a memory. The tiled image contains a plurality of tiles one of which is a target tile. The plurality of sequential imaging operations that operate on the tiled image terminates with a result producing imaging operation. This method captures the plurality of sequential imaging operations that are to be performed on the tiled image. It also determines the target tile in the tiled image that is to be operated on by the plurality of sequential imaging operations. Then the method applies the plurality of sequential imaging operations sequentially on the target tile to realize a portion of a destination image.
Another aspect of the invention is an apparatus, having a central processing unit (CPU) and a memory coupled to said CPU, for applying a plurality of sequential imaging operations to a tiled image. The tiled image has a plurality of tiles including a target tile. The plurality of sequential imaging operations terminate with a result producing imaging operation. The apparatus includes an operation capture mechanism that is configured to capture the plurality of sequential imaging operations to be performed on the tiled image. The operation capture mechanism also detects the result producing imaging operation. Also included with the apparatus is a target tile determination mechanism that is configured to determine the target tile operated on by the plurality of sequential imaging operations. the target tile determination mechanism is responsive to detection of said result producing imaging operation by the operation capture mechanism. Additionally, an imaging mechanism that is configured to apply the plurality of sequential imaging operations sequentially on the target tile to realize a portion of a destination image.
In yet another aspect of the invention a computer system is disclosed, including a central processing unit coupled to a memory, for applying a plurality of sequential imaging operations to a tiled image. The tiled image has a plurality of tiles including a target tile. The plurality of sequential imaging operations terminate with a result producing imaging operation. The system includes an operation capture mechanism that is configured to capture the plurality of sequential imaging operations to be performed on the tiled image. The operation capture mechanism also detects the result producing imaging operation. Also included with the system is a target tile determination mechanism that is configured to determine the target tile operated on by the plurality of sequential imaging operations. The target tile determination mechanism is responsive to detection of said result producing imaging operation by the operation capture mechanism. Additionally, an imaging mechanism that is configured to apply the plurality of sequential imaging operations sequentially on the target tile to realize a portion of a destination image.
Yet a further aspect of the invention is a computer program product embedded on a computer usable medium for causing a computer to apply a plurality of sequential imaging operations to a tiled image. When executed on a computer, the computer readable code causes a computer to effect an operation capture mechanism, a target tile determination mechanism, and an imaging mechanism. Each of these mechanisms having the same functions as the corresponding mechanisms for the previously described apparatus.
The foregoing and many other aspects of the present invention will no doubt become obvious to those of ordinary skill in the art after having read the following detailed description of the preferred embodiments that are illustrated in the various drawing figures.